<template>
  <div>
    <el-dialog :title="title" v-model="componOpen" :width="componWidth ? componWidth + 'px' : '500px'" :append-to-body="body">
      <slot name="content"></slot>
      <template #footer>
        <span class="dialog-footer">
          <slot name="confirm"></slot>
          <el-button @click="componOpen = false">取 消</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>

<script lang="ts" setup>
defineProps(["title", "body", "componWidth"]);
const componOpen = ref(false);
defineExpose({ componOpen });
</script>

<style scoped></style>
